package cn.puge.mertisfront.controller;


import cn.puge.commonutils.R;
import cn.puge.mertisfront.entity.LikePubVo.likePubishVo;
import cn.puge.mertisfront.service.PugePubishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *查询所有处罚
 * @author LIJW
 * @since 2020-09-18
 */
@CrossOrigin
@RestController
@RequestMapping("/mertisfront/puge-pubish")
public class PugePubishController {

    //注入处罚service
     @Autowired
     private PugePubishService pugePubishService;

    /**
     *   查询所有处罚信息 和点赞用户信息
     * @return
     */
    @GetMapping("getAllPubish")
    public R getAllPubish(){


        //查询所有处罚信息 和点赞用户信息
      List<likePubishVo> likePubishVos =   pugePubishService.getAllPubish();

        return R.ok().data("likePubishVos",likePubishVos);
    }










}

